package com.ruoyi.web.wapper;

import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.wapper.BaseControllerWrapper;
import com.ruoyi.market.enums.SpecialEnum;

import java.util.List;
import java.util.Map;

public class SourceMemberDataInfoHistoryWapper extends BaseControllerWrapper {

    public SourceMemberDataInfoHistoryWapper(Map<String, Object> single) {
        super(single);
    }

    public SourceMemberDataInfoHistoryWapper(List<Map<String, Object>> multi) {
        super(multi);
    }

    @Override
    public void wrapTheMap(Map<String, Object> map) {

        try {


            String loanAmount = (String) map.get("loanAmount");
            if (StringUtils.isNotEmpty(loanAmount)){
                map.put("loanAmount", SpecialEnum.LoanAmount.getNameByValue(loanAmount));
            }
           String loanTime = (String) map.get("loanTime");
            if (StringUtils.isNotEmpty(loanTime)){
                map.put("loanTime", SpecialEnum.LoanTime.getNameByValue(loanTime));
            }

            String zhimaScore = (String) map.get("zhimaScore");
            if (StringUtils.isNotEmpty(zhimaScore)){
                map.put("zhimaScore", SpecialEnum.ZhimaScore.getNameByValue(zhimaScore));
            }

            String gjj = (String) map.get("gjj");
            if (StringUtils.isNotEmpty(gjj)){
                map.put("gjj", SpecialEnum.Gjj.getNameByValue(gjj));
            }

            String salary = (String) map.get("salary");
            if (StringUtils.isNotEmpty(salary)){
                map.put("salary", SpecialEnum.Salary.getNameByValue(salary));
            }

            String house = (String) map.get("house");
            if (StringUtils.isNotEmpty(house)){
                map.put("house", SpecialEnum.House.getNameByValue(house));
            }

            String job = (String) map.get("job");
            if (StringUtils.isNotEmpty(job)){
                map.put("job", SpecialEnum.Job.getNameByValue(job));
            }

            String car = (String) map.get("car");
            if (StringUtils.isNotEmpty(car)){
                map.put("car", SpecialEnum.Car.getNameByValue(car));
            }

            String yuqi = (String) map.get("yuqi");
            if (StringUtils.isNotEmpty(yuqi)){
                map.put("yuqi", SpecialEnum.Yuqi.getNameByValue(yuqi));
            }

            String xueli = (String) map.get("xueli");
            if (StringUtils.isNotEmpty(xueli)){
                map.put("xueli", SpecialEnum.XueLi.getNameByValue(xueli));
            }

            String purpose = (String) map.get("purpose");
            if (StringUtils.isNotEmpty(purpose)){
                map.put("purpose", SpecialEnum.Purpose.getNameByValue(purpose));
            }

            String enterpriseOwner = (String) map.get("enterpriseOwner");
            if (StringUtils.isNotEmpty(enterpriseOwner)){
                map.put("enterpriseOwner", SpecialEnum.EnterpriseOwner.getNameByValue(enterpriseOwner));
            }

            String baodan = (String) map.get("baodan");
            if (StringUtils.isNotEmpty(baodan)){
                map.put("baodan", SpecialEnum.BaoDan.getNameByValue(baodan));
            }

            String shebao = (String) map.get("shebao");
            if (StringUtils.isNotEmpty(shebao)){
                map.put("shebao", SpecialEnum.SheBao.getNameByValue(shebao));
            }



        }catch (Exception ex){
            ex.printStackTrace();
        }
    }
}
